package com.example.springstudy.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.springstudy.dao.dto.OrderDTO;
import com.example.springstudy.dao.res.OrderRes;
import com.example.springstudy.entity.Order;
import com.example.springstudy.entity.OrderSku;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface OrderMapper extends BaseMapper<Order> {

    Order createOrder(OrderDTO order);

    OrderRes queryOrder(int orderId);

    List<OrderRes> queryOrderListByPage(int shopId, int employeeId, int page, int size);

    boolean updateOrder(OrderDTO order);

    void insertOrderSkuList(int orderId, List<OrderSku> list);
}
